/*
 * @Author: yumao 123456
 * @Date: 2025-09-13 09:33:18
 * @LastEditors: yumao 123456
 * @LastEditTime: 2025-09-15 15:04:51
 * @FilePath: \龙飞1\src\api\creditSetting.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

const modelApi = {
  List: '/modelApi/bizparamset/list',
  Create: '/modelApi/bizparamset/create',
  Detail: '/modelApi/bizparamset/detail',
  Update: '/modelApi/bizparamset/update',
  Delete: '/modelApi/bizparamset/delete',
  ParamList: '/modelApi/bizbusiparam/list',
  ParamDelBatch: '/modelApi/bizbusiparam/del_batch',
  listAsyn: '/modelApi/bizbusiparam/list_asyn',
  InsertBatch: '/modelApi/bizbusiparam/insert_batch',
}

// 变量集-分页查询
export function getBizList(parameter) {
  return request({
    url: modelApi.List,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
  })
}
// 变量集-新增
export function getBizCreate(sub) {
  return request({
    url: modelApi.Create,
    method: 'post',
    data: sub,
  })
}
// 变量集-详情
export function getBizDetail(parameter) {
  return request({
    url: modelApi.Detail,
    method: 'get',
    params: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
  })
}
// 变量集-编辑
export function getBizUpdate(sub) {
  return request({
    url: modelApi.Update,
    method: 'post',
    data: sub,
  })
}
// 变量集-删除
export function getBizDelete(parameter) {
  return request({
    url: modelApi.Delete,
    method: 'post',
    params: parameter,
  })
}

// 查询变量集下的征信变量配置
export function getParamList(parameter) {
  return request({
    url: modelApi.ParamList,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
  })
}

// 批量删除请求
export function paramDelBatch(sub) {
  return request({
    url: modelApi.ParamDelBatch,
    method: 'post',
    data: sub,
  })
}

// 变量查询请求
export function getListAsyn(sub) {
  return request({
    url: modelApi.listAsyn,
    method: 'post',
    data: sub,
  })
}

// 添加请求
export function insertBatch(sub) {
  return request({
    url: modelApi.InsertBatch,
    method: 'post',
    data: sub,
  })
}
